How to compile E2FS Library
If you are under Linux, you should already have e2fsprogs, get the devel package if you don't have it. Otherwise, get e2fsprogs-1.26.tgz or a new version at http://e2fsprogs.sourceforge.net.
Packages for DJGPP
I don't know if you need them all but it works for me.
- GNU Binutils 2.11.2 binaries for DJGPP
- bsh204d GNU Bash 2.04 binary for DJGPP
- bsn129b GNU bison 1.29 for DJGPP V2
- csdpmi5b CWSDPMI binary distribution (release 5)
- dif272b GNU Diffutils 2.7.2 for DJGPP V2
- djdev203 Development Kit and Runtime
- faq230b DJGPP FAQ List edition 2.30 for DJGPP v2.03
- fil40b GNU Fileutils 4.0 for DJGPP 2.x, release 3 (binaries)
- File(1) 3.34: binaries
- find41b GNU findutils 4.1 for DJGPP V2
- flx254b GNU Flex 2.5.4 binaries for DJGPP V2
- gcc304b.zip : GCC 3.0.4 C compiler binaries for DJGPP
- gdb500b GDB GNU Debugger version 5.0 binaries for DJGPP v2
- gpp302b.zip : GCC 3.0.2 C++ compiler binaries for DJGPP
- grep24b GNU grep 2.4 binaries for DJGPP V2
- gwk306b GNU Awk 3.0.6 for DJGPP v2
- m4-14b GNU M4 1.4 binaries for DJGPP v2
- mak3791b GNU Make 3.79.1 binaries for DJGPP V2
- mlp107b Executable File Packer for DJGPP V2
- objc302b.zip : GCC 3.0.2 Objective C compiler binaries for DJGPP
- pdcur24b.zip PDCurses 2.4 binary for DJGPP
- perl561b Perl 5.6.1b for DJGPP V2 (binary)
- sed3028b GNU sed 3.02.80 for DJGPP V2
- shl112b GNU sh-utils 1.12 for DJGPP V2
- tar112ab GNU tar 1.12a binaries for DJGPP V2
- txi40b GNU Texinfo 4.0 binaries for DJGPP V2
- txt20b GNU Textutils 2.0 binaries for DJGPP V2
- Which version 2.11 modified to work with DJGPP by David Cullen
Patching DJGPP
In include/signal.h
, add
#ifndef SIGCONT
#define SIGCONT 18 /* CG */
#endif
In include/mntent.h
, add
#ifndef MOUNTED
#define MOUNTED "/etc/mtab" /* CG */
#endif
#ifndef MNTOPT_RO
#define MNTOPT_RO "ro" /* CG */
#endif
In include/errno.h
, add
#ifndef EOPNOTSUPP
#define EOPNOTSUPP 95 /* CG */
#endif
Patching EXT2FS for BSD or DJGPP
In lib/uuid/gen_uuid.c
, comment the following line
//#include /* CG */
If you are under BSD, in lib/ext2fs/flushb.c
, add
#include <sys/param.h>
Compilation
Under Dos or Win9x, run
bash
./configure --with-cc=gcc && make libs
Under Linux or BSD, run ./configure && make
ReiserFS Library
bash
./configure --disable-nls
make
I can't compile this library under FreeBSD 4.3.
It compiles with DJGPP under Dos but it doesn't work.
Binary distribution
To reduce the e2fs library size, run strip -g libext2fs.a
.
TestDisk home: http://www.cgsecurity.org/testdisk.html.
Christophe GRENIER grenier@cgsecurity.org